#ifndef FILESYS_FILESYS_H
#define FILESYS_FILESYS_H

#include <stdbool.h>
#include "filesys/off_t.h"
//
#include "filesys/inode.h"
//

/* Sectors of system file inodes. */
#define FREE_MAP_SECTOR 0       /* Free map file inode sector. */
#define ROOT_DIR_SECTOR 1       /* Root directory file inode sector. */

/* Disk used for file system. */
extern struct disk *filesys_disk;

void filesys_init (bool format);
void filesys_done (void);
bool filesys_create (const char*, off_t, bool);
struct file *filesys_open (const char*);
bool filesys_remove (const char*);
struct dir filesys_dir_initialize (struct file*, int);
struct dir* filesys_dir_get_by_path (char*);
struct file* filesys_dir_get_file (struct dir*, char*);
struct file* filesys_dir_get_file_by_path (char*);

#endif /* filesys/filesys.h  */
